<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            width: 100px;
            height: 100px;
            background-color: palegoldenrod;
            position: absolute;
            /* z-index级数越上面 */
            z-index: 2;
        }
        .box2{
            width: 80px;
            height: 80px;
            background: palegreen;
            position: absolute;
            top: 50px;
            z-index: 3;
            
        }
    </style>
</head>
<body>
    <div class="box1">
        我是爹
    </div>
    <div class="box2">
        我是儿
    </div>
</body>
</html>